Fully Qualified Name: | Laminas\Stdlib\StringWrapper\StringWrapperInterface |
Name | Description | Defined By |
---|---|---|
convert() | Convert a string from defined encoding to the defined convert encoding | StringWrapperInterface |
getConvertEncoding() | Get the defined character encoding to convert to (upper case) | StringWrapperInterface |
getEncoding() | Get the defined character encoding to work with (upper case) | StringWrapperInterface |
getSupportedEncodings() | Get a list of supported character encodings | StringWrapperInterface |
isSupported() | Check if the given character encoding is supported by this wrapper and the character encoding to convert to is also supported. | StringWrapperInterface |
setEncoding() | Set character encoding working with and convert to | StringWrapperInterface |
strPad() | Pad a string to a certain length with another string | StringWrapperInterface |
strlen() | Returns the length of the given string | StringWrapperInterface |
strpos() | Find the position of the first occurrence of a substring in a string | StringWrapperInterface |
substr() | Returns the portion of string specified by the start and length parameters | StringWrapperInterface |
wordWrap() | Wraps a string to a given number of characters | StringWrapperInterface |
Convert a string from defined encoding to the defined convert encoding
Parameter Name | Type | Description |
---|---|---|
$str | string | |
$reverse | bool |
Returns: string|bool
Get the defined character encoding to convert to (upper case)
Returns: string|null
Get the defined character encoding to work with (upper case)
Returns: string
Get a list of supported character encodings
Returns: string[]
Check if the given character encoding is supported by this wrapper and the character encoding to convert to is also supported.
Parameter Name | Type | Description |
---|---|---|
$encoding | string | |
$convertEncoding | string|null |
Returns:
Set character encoding working with and convert to
Parameter Name | Type | Description |
---|---|---|
$encoding | string | The |
$convertEncoding | string|null | The |
Returns: \StringWrapperInterface
Pad a string to a certain length with another string
Parameter Name | Type | Description |
---|---|---|
$input | string | |
$padLength | int | |
$padString | string | |
$padType | int |
Returns: string
Returns the length of the given string
Parameter Name | Type | Description |
---|---|---|
$str | string |
Returns: int|bool
Find the position of the first occurrence of a substring in a string
Parameter Name | Type | Description |
---|---|---|
$haystack | string | |
$needle | string | |
$offset | int |
Returns: int|bool
Returns the portion of string specified by the start and length parameters
Parameter Name | Type | Description |
---|---|---|
$str | string | |
$offset | int | |
$length | int|null |
Returns: string|bool
Wraps a string to a given number of characters
Parameter Name | Type | Description |
---|---|---|
$str | string | |
$width | int | |
$break | string | |
$cut | bool |
Returns: string